FROM openanolis/anolisos:8.6

LABEL \
    maintainer="OpenAnolis Cloud Native SIG" \
    org.opencontainers.image.title="nginx" \
    org.opencontainers.image.version="1.14-8.6"

RUN yum -y update; \
    yum -y install nginx; \
    yum clean all

# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log; \
    ln -sf /dev/stderr /var/log/nginx/error.log

COPY docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]

EXPOSE 80

STOPSIGNAL SIGTERM

CMD ["nginx", "-g", "daemon off;"]
